{"componentChunkName":"component---src-templates-post-js","path":"/blogs/opencode-cli-guide","result":{"data":{"markdownRemark":{"html":"<h2>Introduction</h2>\n<p>AI coding assistants have gone from novelty to necessity in just a couple of years. Tools like GitHub Copilot and Cursor showed developers what it feels like to have a second brain on tap — autocompleting functions, generating tests, and explaining unfamiliar code in plain English. But as the tooling matured, a new wave of developers started asking a different question: <em>what if the AI didn't live inside an editor at all?</em></p>\n<p>That's where terminal-native AI tools come in. They run where your Git workflow already lives, understand your whole project rather than just the open file, and give you fine-grained control over how changes get applied. For many engineers — especially those who live in Vim, Neovim, or plain old bash — the terminal is home.</p>\n<p>Enter <strong>OpenCode CLI</strong>: an open-source, terminal-native AI coding agent designed for developers who want a powerful, transparent, and highly customizable AI pair programmer without being locked into a proprietary ecosystem. In this guide, we'll walk through everything you need to know — from installation to real-world workflows — and show you why it's quickly becoming a favorite among AI developer tools.</p>\n<hr>\n<h2>What is OpenCode CLI?</h2>\n<p>OpenCode is an <strong>open-source AI coding agent</strong> that runs natively in your terminal. It's a single binary you launch with the <code class=\"language-text\">opencode</code> command, and it opens a polished terminal user interface (TUI) where you can chat with an AI model that has full access to your project.</p>\n<p>But calling it \"just a chatbot\" undersells it. OpenCode is an <em>agent</em> — it can read files, search your codebase, write and edit files, run commands, and work through multi-step tasks on your behalf. It's designed to feel like a thoughtful pair programmer sitting next to you, not a glorified autocomplete.</p>\n<p>The project's design philosophy is refreshingly pragmatic:</p>\n<ul>\n<li><strong>Terminal-first.</strong> Your editor, your Git hooks, your muscle memory — everything stays the same.</li>\n<li><strong>Open source.</strong> The entire codebase lives on GitHub, so you can audit what it does, contribute features, and even fork it.</li>\n<li><strong>Provider-agnostic.</strong> Use OpenAI, Anthropic, Google, local models, or anything in between. OpenCode is the <em>interface</em>; you choose the brain.</li>\n<li><strong>Privacy-respecting.</strong> Your code and conversations go only to the provider you explicitly configure. There's no third-party middleman unless you add one.</li>\n</ul>\n<p>While the terminal experience is the core, OpenCode also ships as a desktop app and an IDE extension, so you can pick the surface that fits your workflow.</p>\n<hr>\n<h2>Key Features</h2>\n<p>Let's break down what makes OpenCode feel powerful in practice.</p>\n<h3>AI-Powered Coding Assistance</h3>\n<p>At its heart, OpenCode is a full agentic coding assistant. You can ask it to write features, fix bugs, refactor code, and explain complex logic — and it will actually do the work across your project, not just in a single file.</p>\n<h3>Project-Aware Context</h3>\n<p>OpenCode doesn't treat your files as isolated snippets. When you run <code class=\"language-text\">/init</code>, it analyzes your project and generates an <code class=\"language-text\">AGENTS.md</code> file in the root that captures the project's structure and coding patterns. Every future session reads that context, so the AI understands your conventions before it touches a single line.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token builtin class-name\">cd</span> /path/to/project\nopencode\n/init</code></pre></div>\n<blockquote>\n<p><strong>Tip:</strong> Commit your project's <code class=\"language-text\">AGENTS.md</code> file to Git. It helps OpenCode — and your teammates — understand the codebase instantly.</p>\n</blockquote>\n<h3>Terminal-Native Workflow</h3>\n<p>Everything runs in your existing terminal emulator. There's no new IDE to learn, no cloud workspace to provision, and no context-switching. If you already live in a terminal, OpenCode feels instantly familiar.</p>\n<h3>Plan Mode &#x26; Build Mode</h3>\n<p>One of OpenCode's smartest features is the ability to separate <em>thinking</em> from <em>doing</em>. Press <strong>Tab</strong> to switch into <strong>Plan mode</strong>, describe the feature you want, and the agent will propose an implementation strategy without changing any files. Review it, iterate on it, then press Tab again to enter <strong>Build mode</strong> and let it execute.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">When a user deletes a note, we&#39;d like to flag it as deleted in the database.\nThen create a screen that shows all the recently deleted notes.</code></pre></div>\n<h3>Multi-File Editing</h3>\n<p>Ask OpenCode to implement a feature that spans several files, and it will make coordinated edits across all of them — updating imports, touching related modules, and keeping the change consistent.</p>\n<h3>Undo / Redo</h3>\n<p>Made a change you don't like? Run <code class=\"language-text\">/undo</code> to revert it, and OpenCode brings back your original prompt so you can tweak and retry. Run it multiple times to step backward through several changes, or use <code class=\"language-text\">/redo</code> to move forward again.</p>\n<h3>Git Integration</h3>\n<p>OpenCode works naturally alongside Git. It can operate on PR branches (<code class=\"language-text\">opencode pr &lt;number&gt;</code>), and the GitHub agent lets you automate repository workflows like issue triage and review through a GitHub Actions workflow.</p>\n<h3>Support for Multiple LLM Providers</h3>\n<p>This is a defining differentiator. OpenCode builds on the <a href=\"https://ai-sdk.dev/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AI SDK</a> and <a href=\"https://models.dev\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Models.dev</a>, giving you access to <strong>75+ LLM providers</strong>. You can switch brains for different tasks — a fast model for quick questions, a frontier model for deep refactors — all from the same interface.</p>\n<h3>Fast Performance</h3>\n<p>OpenCode is a compiled binary with a snappy TUI. Startup is quick, keystrokes are responsive, and sessions are cached so you can resume where you left off instantly.</p>\n<h3>Extensibility</h3>\n<p>OpenCode is built to be extended:</p>\n<ul>\n<li><strong>Agents</strong> — define custom agents with their own system prompts and permission sets (<code class=\"language-text\">opencode agent create</code>).</li>\n<li><strong>Plugins</strong> — install plugins that add tools and integrations (<code class=\"language-text\">opencode plugin &lt;module&gt;</code>).</li>\n<li><strong>MCP Servers</strong> — connect Model Context Protocol servers for external tooling (<code class=\"language-text\">opencode mcp add</code>).</li>\n<li><strong>Custom Tools &#x26; LSP Servers</strong> — add your own tools and language-server-powered capabilities.</li>\n<li><strong>Themes &#x26; Keybinds</strong> — make the TUI yours.</li>\n</ul>\n<h3>Custom Prompts &#x26; Commands</h3>\n<p>Create your own reusable slash commands and prompts so common workflows are one keystroke away.</p>\n<h3>Permissions &#x26; Safety</h3>\n<p>OpenCode runs with a permission system that lets you gate what the agent can do — read-only vs. write access, allowed tools, and command execution. Combined with Plan mode and <code class=\"language-text\">/undo</code>, you stay in control.</p>\n<hr>\n<h2>Installation</h2>\n<p>OpenCode is easy to install on every major platform.</p>\n<h3>One-Line Install Script</h3>\n<p>The fastest way:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> -fsSL https://opencode.ai/install <span class=\"token operator\">|</span> <span class=\"token function\">bash</span></code></pre></div>\n<h3>Using a Package Manager</h3>\n<p><strong>npm / Bun / pnpm / Yarn:</strong></p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">npm</span> <span class=\"token function\">install</span> -g opencode-ai\nbun <span class=\"token function\">install</span> -g opencode-ai\n<span class=\"token function\">pnpm</span> <span class=\"token function\">install</span> -g opencode-ai\n<span class=\"token function\">yarn</span> global <span class=\"token function\">add</span> opencode-ai</code></pre></div>\n<p><strong>Homebrew (macOS and Linux):</strong></p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">brew <span class=\"token function\">install</span> anomalyco/tap/opencode</code></pre></div>\n<blockquote>\n<p><strong>Note:</strong> The OpenCode tap is updated more frequently than the official Homebrew formula, so the tap is recommended.</p>\n</blockquote>\n<p><strong>Arch Linux:</strong></p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">sudo</span> pacman -S opencode        <span class=\"token comment\"># Stable</span>\nparu -S opencode-bin           <span class=\"token comment\"># Latest from AUR</span></code></pre></div>\n<p><strong>Windows:</strong></p>\n<p>The best experience on Windows is through <strong>WSL</strong> (Windows Subsystem for Linux), but you also have several native options:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">choco <span class=\"token function\">install</span> opencode          <span class=\"token comment\"># Chocolatey</span>\nscoop <span class=\"token function\">install</span> opencode          <span class=\"token comment\"># Scoop</span>\n<span class=\"token function\">npm</span> <span class=\"token function\">install</span> -g opencode-ai      <span class=\"token comment\"># npm</span>\nmise use -g github:anomalyco/opencode  <span class=\"token comment\"># mise</span>\ndocker run -it --rm ghcr.io/anomalyco/opencode  <span class=\"token comment\"># Docker</span></code></pre></div>\n<p>You can also grab prebuilt binaries directly from the <a href=\"https://github.com/anomalyco/opencode/releases\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GitHub Releases</a> page.</p>\n<hr>\n<h2>Getting Started</h2>\n<p>Let's take OpenCode for a spin.</p>\n<h3>1. Configure a provider</h3>\n<p>Run the <code class=\"language-text\">/connect</code> command inside the TUI and choose your provider. If you're new, the easiest starting point is <strong>OpenCode Zen</strong> — a curated list of models tested and verified by the OpenCode team.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">/connect</code></pre></div>\n<p>Pick a provider, and it will guide you through authentication — either pasting an API key or opening a browser to sign in.</p>\n<blockquote>\n<p><strong>Note:</strong> If you already have a ChatGPT Plus, GitHub Copilot, or GitLab Duo subscription, OpenCode can use those credentials directly with zero extra setup.</p>\n</blockquote>\n<h3>2. Select a model</h3>\n<p>List available models with:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">/models</code></pre></div>\n<p>Models appear in <code class=\"language-text\">provider/model</code> format (for example, <code class=\"language-text\">anthropic/claude-sonnet-4</code>). You can switch models at any time.</p>\n<h3>3. Open your project</h3>\n<p>Navigate to your project and launch OpenCode:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token builtin class-name\">cd</span> /path/to/project\nopencode</code></pre></div>\n<p>Run <code class=\"language-text\">/init</code> so the agent builds an <code class=\"language-text\">AGENTS.md</code> with project context.</p>\n<h3>4. Ask questions</h3>\n<p>You can ask OpenCode to explain parts of the codebase you didn't write. Use <code class=\"language-text\">@</code> to fuzzy-search for files:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">How is authentication handled in @packages/functions/src/api/index.ts</code></pre></div>\n<h3>5. Make changes</h3>\n<p>For a direct change, just describe it:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">We need to add authentication to the /settings route. Take a look at how this is\nhandled in the /notes route and implement the same logic for /settings.</code></pre></div>\n<p>For anything non-trivial, switch to <strong>Plan mode</strong> first (press Tab), review the plan, then switch back to <strong>Build mode</strong> and say <em>\"Go ahead and make the changes.\"</em></p>\n<h3>6. Undo if needed</h3>\n<p>Not happy with the result?</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">/undo</code></pre></div>\n<p>OpenCode reverts the changes and brings back your prompt so you can refine it.</p>\n<h3>7. Non-interactive mode</h3>\n<p>You don't always need the full TUI. For quick questions or scripting:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">opencode run <span class=\"token string\">\"Explain how closures work in JavaScript\"</span></code></pre></div>\n<p>This runs OpenCode headlessly and prints the answer — perfect for automation and CI pipelines.</p>\n<hr>\n<h2>Real-World Use Cases</h2>\n<p>Here's where OpenCode shines in day-to-day development.</p>\n<h3>Debugging</h3>\n<p>Stuck on a cryptic error? Paste the stack trace and let the agent trace the root cause:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">opencode run <span class=\"token string\">\"The tests are failing with a TypeScript type error in src/services. Diagnose the issue and propose a fix.\"</span></code></pre></div>\n<h3>Refactoring Legacy Code</h3>\n<p>OpenCode can safely modernize old code across a codebase, preserving behavior while improving structure. Run it in Plan mode first to review exactly what will change before committing.</p>\n<h3>Explaining Unfamiliar Code</h3>\n<p>Joining a new codebase is intimidating. Ask targeted questions about specific files, and OpenCode explains the architecture using your project's actual code as context.</p>\n<h3>Writing Tests</h3>\n<p>Generate unit and integration tests that match your existing test conventions:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">Look at the testing patterns in @tests/unit and write equivalent tests for the new payment service.</code></pre></div>\n<h3>Documentation Generation</h3>\n<p>Struggling to keep docs current? OpenCode can generate README sections, inline doc comments, and API documentation straight from your source.</p>\n<h3>Code Review</h3>\n<p>Use <code class=\"language-text\">opencode pr &lt;number&gt;</code> to fetch a PR branch and have the agent review the diff for bugs, edge cases, and style issues before you request human review.</p>\n<h3>Learning New Frameworks</h3>\n<p>Ask OpenCode to translate a pattern you know into a framework you don't:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">I know how to do dependency injection in Spring. Show me how to do the same in FastAPI, using this project&#39;s conventions.</code></pre></div>\n<hr>\n<h2>Supported AI Models</h2>\n<p>One of OpenCode's biggest advantages is provider freedom. Because it's built on the AI SDK and Models.dev, it supports <strong>75+ providers</strong>, including:</p>\n<h3>Hosted Providers</h3>\n<ul>\n<li><strong>OpenAI</strong> — GPT models, and ChatGPT Plus/Pro subscription support</li>\n<li><strong>Anthropic</strong> — Claude models</li>\n<li><strong>Google</strong> — Gemini via Vertex AI or Google AI</li>\n<li><strong>OpenRouter</strong> — a unified gateway to hundreds of models</li>\n<li><strong>Groq</strong> — blazing-fast inference</li>\n<li><strong>DeepSeek</strong> — strong open-weights models at low cost</li>\n<li><strong>xAI</strong> — Grok models</li>\n<li><strong>Azure OpenAI</strong> &#x26; <strong>Amazon Bedrock</strong> — enterprise cloud deployments</li>\n<li><strong>Cloudflare</strong> (Workers AI / AI Gateway), <strong>NVIDIA</strong>, <strong>Hugging Face</strong>, <strong>Together AI</strong>, <strong>Moonshot AI</strong>, <strong>MiniMax</strong>, <strong>Cerebras</strong>, and dozens more</li>\n</ul>\n<h3>Local Models</h3>\n<p>Prefer to keep everything on your machine? OpenCode works with:</p>\n<ul>\n<li><strong>Ollama</strong> — popular local model runner</li>\n<li><strong>LM Studio</strong> — desktop app for local LLMs</li>\n<li><strong>llama.cpp</strong> — via its <code class=\"language-text\">llama-server</code> utility</li>\n<li><strong>Atomic Chat</strong> — local models behind an OpenAI-compatible server</li>\n</ul>\n<p>Local models mean zero per-token cost, full privacy, and the freedom to experiment offline.</p>\n<h3>OpenCode's Own Offerings</h3>\n<ul>\n<li><strong>OpenCode Zen</strong> — a curated, tested list of models from the OpenCode team.</li>\n<li><strong>OpenCode Go</strong> — a low-cost subscription providing reliable access to popular open coding models.</li>\n</ul>\n<hr>\n<h2>Advantages</h2>\n<p>Why choose OpenCode over a traditional, editor-bound assistant?</p>\n<h3>Privacy</h3>\n<p>Your code and prompts are sent only to the provider you explicitly configure. There's no opaque middleman collecting your data by default.</p>\n<h3>Speed</h3>\n<p>As a native terminal binary, OpenCode is fast to launch and responsive. No bloated IDE extensions or remote workspace round-trips.</p>\n<h3>Open-Source Ecosystem</h3>\n<p>Being open source means total transparency and the ability to contribute. If you don't like a behavior, you can change it — or install a community plugin that does.</p>\n<h3>Flexibility</h3>\n<p>Switch between 75+ providers and local models with a single command. Use the best model for each task, not whatever the tool vendor decided to bundle.</p>\n<h3>Cost Efficiency</h3>\n<p>Because you control the provider, you control the bill. Use cheap models for routine tasks, frontier models only when needed, or run fully local models for $0.</p>\n<h3>No Vendor Lock-In</h3>\n<p>The TUI and config are provider-agnostic. If a new model provider launches tomorrow, you just add a key — no migration.</p>\n<h3>Local Model Support</h3>\n<p>For air-gapped environments, privacy-sensitive work, or budget constraints, local models through Ollama, LM Studio, or llama.cpp are a first-class option.</p>\n<hr>\n<h2>Comparison</h2>\n<p>How does OpenCode stack up against the other major terminal AI assistants?</p>\n<table>\n<thead>\n<tr>\n<th>Feature</th>\n<th><strong>OpenCode CLI</strong></th>\n<th><strong>Claude Code</strong></th>\n<th><strong>OpenAI Codex CLI</strong></th>\n<th><strong>Gemini CLI</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Open source</strong></td>\n<td>✅ Yes</td>\n<td>❌ No (proprietary)</td>\n<td>✅ Yes</td>\n<td>❌ No</td>\n</tr>\n<tr>\n<td><strong>Terminal-first</strong></td>\n<td>✅ Yes</td>\n<td>✅ Yes</td>\n<td>✅ Yes</td>\n<td>✅ Yes</td>\n</tr>\n<tr>\n<td><strong>Local model support</strong></td>\n<td>✅ Yes (Ollama, LM Studio, llama.cpp)</td>\n<td>❌ No</td>\n<td>❌ No</td>\n<td>❌ No</td>\n</tr>\n<tr>\n<td><strong>Multiple providers</strong></td>\n<td>✅ 75+ providers</td>\n<td>⚠️ Limited (Anthropic-centric)</td>\n<td>❌ OpenAI-centric</td>\n<td>❌ Google-centric</td>\n</tr>\n<tr>\n<td><strong>Customization</strong></td>\n<td>✅ High (plugins, MCP, custom agents, themes)</td>\n<td>⚠️ Medium (extends Claude)</td>\n<td>⚠️ Medium</td>\n<td>⚠️ Low-Medium</td>\n</tr>\n<tr>\n<td><strong>Pricing</strong></td>\n<td>✅ Free (bring your own provider)</td>\n<td>⚠️ Subscription/usage</td>\n<td>⚠️ Usage-based</td>\n<td>⚠️ Free tier + usage</td>\n</tr>\n<tr>\n<td><strong>Ease of use</strong></td>\n<td>✅ Great onboarding (<code class=\"language-text\">/connect</code>, <code class=\"language-text\">/init</code>)</td>\n<td>✅ Very good</td>\n<td>✅ Good</td>\n<td>✅ Good</td>\n</tr>\n</tbody>\n</table>\n<p>The takeaway: if you want <strong>freedom of choice</strong> — open source, any provider, and local models — OpenCode is the strongest option today. Claude Code and the others are polished tools, but they're tightly coupled to their parent companies' ecosystems.</p>\n<hr>\n<h2>Tips and Best Practices</h2>\n<p>A few habits that get the most out of OpenCode:</p>\n<ol>\n<li><strong>Commit <code class=\"language-text\">AGENTS.md</code>.</strong> Project context is the single biggest quality lever. Keep it up to date.</li>\n<li><strong>Use Plan mode for big changes.</strong> Always let it propose a strategy before touching code. Iterate on the plan first.</li>\n<li><strong>Be specific in prompts.</strong> Talk to OpenCode like a junior engineer: give file paths, expected behavior, and constraints.</li>\n<li><strong>Use <code class=\"language-text\">@</code> to reference files.</strong> Fuzzy-search with <code class=\"language-text\">@</code> gives the agent precise file context.</li>\n<li><strong>Lean on <code class=\"language-text\">/undo</code>.</strong> Don't be afraid to experiment — you can always revert.</li>\n<li><strong>Try <code class=\"language-text\">opencode run</code> for automation.</strong> Script common questions or wire it into CI for quick answers.</li>\n<li><strong>Match the model to the task.</strong> Use fast/cheap models for routine edits, frontier models for hard refactors.</li>\n<li><strong>Configure permissions.</strong> Start read-only where possible, then open up write access as you build trust.</li>\n<li><strong>Use MCP servers and plugins.</strong> Extend OpenCode with your team's tools instead of reinventing workflows.</li>\n<li><strong>Share sessions with <code class=\"language-text\">/share</code></strong> when collaborating, so teammates can see exactly what the agent did.</li>\n</ol>\n<hr>\n<h2>Limitations</h2>\n<p>No tool is perfect, and it's worth being honest about OpenCode's current rough edges:</p>\n<ul>\n<li><strong>Terminal prerequisites.</strong> It expects a modern terminal emulator, and on Windows the best experience is via WSL. That's a barrier for some developers.</li>\n<li><strong>Learning curve.</strong> Agents, permissions, MCP, and config files are powerful but take time to learn compared to a simple autocomplete plugin.</li>\n<li><strong>Token costs.</strong> Hosted models charge per token, so heavy agentic use can add up — though local models and <code class=\"language-text\">OpenCode Go</code> help.</li>\n<li><strong>Experimental surface.</strong> The project moves fast, and some features are still experimental and can change between releases.</li>\n<li><strong>Prompt quality matters.</strong> Like all LLM tools, output quality depends heavily on how well you frame your requests and how good your project context is.</li>\n</ul>\n<p>These are fair trade-offs for the flexibility you get, and most are actively being addressed by the project's rapid development.</p>\n<hr>\n<h2>Future of AI Terminal Assistants</h2>\n<p>We're at an inflection point. The next wave of developer tooling isn't about autocomplete — it's about <em>agents</em> that plan, execute, and verify multi-step work. Terminal-native assistants like OpenCode are at the center of that shift.</p>\n<p>Several trends point to where this is heading:</p>\n<ul>\n<li><strong>Agentic workflows.</strong> Tools are moving from \"suggest a line\" to \"design, build, test, and ship\" — with humans reviewing at key checkpoints.</li>\n<li><strong>The MCP ecosystem.</strong> Model Context Protocol is becoming the standard way for agents to talk to external tools, databases, and services. OpenCode's native MCP support puts it ahead of the curve.</li>\n<li><strong>Local models getting good.</strong> As open-weights models close the gap with frontier models, local-first agents become viable for more teams — and OpenCode already supports them.</li>\n<li><strong>Blurring editor/terminal boundaries.</strong> Desktop apps and IDE extensions are lowering the barrier for developers who prefer GUIs, without giving up the agent's power.</li>\n<li><strong>Open source as a trust signal.</strong> In a tool that touches your source code, being able to audit and extend it matters. Open-source agents have a durable advantage.</li>\n</ul>\n<p>OpenCode is well-positioned in this ecosystem: it's open source, provider-agnostic, and aggressively extensible. As agentic workflows become the default, tools that let <em>you</em> choose the brain — and take it with you anywhere — will win the developer's trust.</p>\n<hr>\n<h2>Conclusion</h2>\n<p>OpenCode CLI is more than just another AI coding assistant. It's a terminal-native, open-source agent that puts <strong>you</strong> in control: your provider, your models, your permissions, your workflow. Whether you're a solo developer who wants a powerful pair programmer, an engineer who values privacy and local models, or a team building custom agentic workflows, OpenCode adapts to you — not the other way around.</p>\n<p>The fastest way to decide if it's for you is to try it:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> -fsSL https://opencode.ai/install <span class=\"token operator\">|</span> <span class=\"token function\">bash</span></code></pre></div>\n<p>Then <code class=\"language-text\">cd</code> into a project, run <code class=\"language-text\">opencode</code>, hit <code class=\"language-text\">/connect</code>, and ask it something about your code. Five minutes in, you'll know exactly why terminal-native AI tools are the future — and why <strong>OpenCode CLI</strong> deserves a permanent spot in your toolkit.</p>","frontmatter":{"title":"OpenCode CLI: Your Terminal-Native AI Coding Assistant","description":"A comprehensive guide to OpenCode CLI — the open-source, terminal-native AI coding agent. Learn installation, features, supported providers, use cases, and how it compares with Claude Code, Codex, and Gemini CLI.","date":"2026-07-30","slug":"/blogs/opencode-cli-guide","tags":["AI","Developer Tools","CLI","Open Source","Tutorial"]}},"allMarkdownRemark":{"edges":[{"node":{"frontmatter":{"title":"OpenCode CLI: Your Terminal-Native AI Coding Assistant","description":"A comprehensive guide to OpenCode CLI — the open-source, terminal-native AI coding agent. Learn installation, features, supported providers, use cases, and how it compares with Claude Code, Codex, and Gemini CLI.","slug":"/blogs/opencode-cli-guide","tags":["AI","Developer Tools","CLI","Open Source","Tutorial"]}}}]}},"pageContext":{}}}